my $suids = fetchall_hash("suids")
    or return;

foreach my $path (sort keys %{ $suids })
{
    next unless -e $path;
    next unless defined $suids->{$path};
    my $mode = (stat _)[2] & 07777;
    my $correct = $suids->{$path} ? ($mode|04000) : ($mode&~04000);
    set_attr $path, { mode=>$correct };
}

1;
